package com.etc.service.impl;

import com.etc.dao.TypeMapper;
import com.etc.entity.Type;
import com.etc.entity.User;
import com.etc.service.TypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class TypeServiceImpl implements TypeService {
    @Autowired
    private TypeMapper mapper;

    /**
     * 根据id删除Type
     * @param id
     * @return
     */
    @Override
    public int deleteByPrimaryKey(Integer id) {
        return mapper.deleteByPrimaryKey(id);
    }

    /**
     * 增加Type
     * @param type
     * @return
     */
    @Override
    public int insert(Type type) {
        return mapper.insert(type);
    }

    @Override
    public int insertSelective(Type record) {
        return 0;
    }

    /**
     * 根据id查询Type
     * @param id
     * @return
     */
    @Override
    public Type selectByPrimaryKey(Integer id) {
        return mapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(User record) {
        return 0;
    }

    /**
     * 更改Type
     * @param type
     * @return
     */
    @Override
    public int updateByPrimaryKey(Type type) {
        return mapper.updateByPrimaryKey(type);
    }
}
